import request from '@/utils/request';
import type { HttpResult } from '@/api';
import type { SysTenantModule } from "./model"

// 编辑租户模块
export const edit = async (data: { tenantId: string, moduleIdList: string[] }): Promise<HttpResult<boolean>> => {
  const res = await request.post<HttpResult<boolean>>(
    '/system/sysTenantModule/edit',
    data
  );
  return res.data;
};

// 根据租户获取模块
export const queryList = async (id: string): Promise<HttpResult<SysTenantModule[]>> => {
  const res = await request.post<HttpResult<SysTenantModule[]>>(
    '/system/sysTenantModule/queryList',
    { tenantId: id }
  );
  return res.data;
};

